3.2.89 \(\int \frac {a+i a \tan (c+d x)}{\sqrt {e \sec (c+d x)}} \, dx\) [189]

Optimal. Leaf size=60 \[ -\frac {2 i a}{d \sqrt {e \sec (c+d x)}}+\frac {2 a E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)}} \]

[Out]

-2*I*a/d/(e*sec(d*x+c))^(1/2)+2*a*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d*x+1/2*c)
,2^(1/2))/d/cos(d*x+c)^(1/2)/(e*sec(d*x+c))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {3567, 3856, 2719} \begin {gather*} \frac {2 a E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)}}-\frac {2 i a}{d \sqrt {e \sec (c+d x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[c + d*x])/Sqrt[e*Sec[c + d*x]],x]

[Out]

((-2*I)*a)/(d*Sqrt[e*Sec[c + d*x]]) + (2*a*EllipticE[(c + d*x)/2, 2])/(d*Sqrt[Cos[c + d*x]]*Sqrt[e*Sec[c + d*x
]])

Rule 2719

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{
c, d}, x]

Rule 3567

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*((d*Sec[
e + f*x])^m/(f*m)), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 3856

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Dist[(b*Csc[c + d*x])^n*Sin[c + d*x]^n, Int[1/Sin[c + d
*x]^n, x], x] /; FreeQ[{b, c, d}, x] && EqQ[n^2, 1/4]

Rubi steps

\begin {align*} \int \frac {a+i a \tan (c+d x)}{\sqrt {e \sec (c+d x)}} \, dx &=-\frac {2 i a}{d \sqrt {e \sec (c+d x)}}+a \int \frac {1}{\sqrt {e \sec (c+d x)}} \, dx\\ &=-\frac {2 i a}{d \sqrt {e \sec (c+d x)}}+\frac {a \int \sqrt {\cos (c+d x)} \, dx}{\sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)}}\\ &=-\frac {2 i a}{d \sqrt {e \sec (c+d x)}}+\frac {2 a E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {e \sec (c+d x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
time = 0.34, size = 73, normalized size = 1.22 \begin {gather*} -\frac {4 i a e^{2 i (c+d x)} \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i (c+d x)}\right )}{3 d \sqrt {1+e^{2 i (c+d x)}} \sqrt {e \sec (c+d x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[c + d*x])/Sqrt[e*Sec[c + d*x]],x]

[Out]

(((-4*I)/3)*a*E^((2*I)*(c + d*x))*Hypergeometric2F1[1/2, 3/4, 7/4, -E^((2*I)*(c + d*x))])/(d*Sqrt[1 + E^((2*I)
*(c + d*x))]*Sqrt[e*Sec[c + d*x]])

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 909 vs. \(2 (79 ) = 158\).
time = 0.59, size = 910, normalized size = 15.17

method result size
risch \(-\frac {2 i a \sqrt {2}}{d \sqrt {\frac {e \,{\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}}-\frac {i \left (-\frac {2 \left (e \,{\mathrm e}^{2 i \left (d x +c \right )}+e \right )}{e \sqrt {{\mathrm e}^{i \left (d x +c \right )} \left (e \,{\mathrm e}^{2 i \left (d x +c \right )}+e \right )}}+\frac {i \sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\, \sqrt {2}\, \sqrt {i \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}\, \sqrt {i {\mathrm e}^{i \left (d x +c \right )}}\, \left (-2 i \EllipticE \left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )+i \EllipticF \left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )\right )}{\sqrt {e \,{\mathrm e}^{3 i \left (d x +c \right )}+e \,{\mathrm e}^{i \left (d x +c \right )}}}\right ) a \sqrt {2}\, \sqrt {e \,{\mathrm e}^{i \left (d x +c \right )} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}}{d \sqrt {\frac {e \,{\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}\, \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}\) \(301\)
default \(\text {Expression too large to display}\) \(910\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(d*x+c))/(e*sec(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/2*a/d*(-1+cos(d*x+c))*(4*I*(1/(1+cos(d*x+c)))^(1/2)*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(-cos(d*x+c)/(1+cos(d
*x+c))^2)^(1/2)*EllipticF(I*(-1+cos(d*x+c))/sin(d*x+c),I)*sin(d*x+c)*cos(d*x+c)^2-4*I*(1/(1+cos(d*x+c)))^(1/2)
*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(-cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*EllipticE(I*(-1+cos(d*x+c))/sin(d*x+c)
,I)*sin(d*x+c)*cos(d*x+c)^2+8*I*(1/(1+cos(d*x+c)))^(1/2)*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(-cos(d*x+c)/(1+cos
(d*x+c))^2)^(1/2)*EllipticF(I*(-1+cos(d*x+c))/sin(d*x+c),I)*sin(d*x+c)*cos(d*x+c)-8*I*(1/(1+cos(d*x+c)))^(1/2)
*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(-cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*EllipticE(I*(-1+cos(d*x+c))/sin(d*x+c)
,I)*sin(d*x+c)*cos(d*x+c)+4*I*(1/(1+cos(d*x+c)))^(1/2)*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(-cos(d*x+c)/(1+cos(d
*x+c))^2)^(1/2)*EllipticF(I*(-1+cos(d*x+c))/sin(d*x+c),I)*sin(d*x+c)-4*I*(1/(1+cos(d*x+c)))^(1/2)*(cos(d*x+c)/
(1+cos(d*x+c)))^(1/2)*(-cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*EllipticE(I*(-1+cos(d*x+c))/sin(d*x+c),I)*sin(d*x+c
)-4*I*(-cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*sin(d*x+c)*cos(d*x+c)^2-4*I*(-cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*si
n(d*x+c)*cos(d*x+c)-4*(-cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*cos(d*x+c)^3-I*cos(d*x+c)*ln(-(2*(-cos(d*x+c)/(1+co
s(d*x+c))^2)^(1/2)*cos(d*x+c)^2-cos(d*x+c)^2-2*(-cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)+2*cos(d*x+c)-1)/sin(d*x+c)
^2)*sin(d*x+c)+I*ln(-2*(2*(-cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)*cos(d*x+c)^2-cos(d*x+c)^2-2*(-cos(d*x+c)/(1+cos
(d*x+c))^2)^(1/2)+2*cos(d*x+c)-1)/sin(d*x+c)^2)*cos(d*x+c)*sin(d*x+c)+4*cos(d*x+c)*(-cos(d*x+c)/(1+cos(d*x+c))
^2)^(1/2))/(-cos(d*x+c)/(1+cos(d*x+c))^2)^(1/2)/sin(d*x+c)^3/cos(d*x+c)/(e/cos(d*x+c))^(1/2)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))/(e*sec(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

e^(-1/2)*integrate((I*a*tan(d*x + c) + a)/sqrt(sec(d*x + c)), x)

________________________________________________________________________________________

Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.10, size = 26, normalized size = 0.43 \begin {gather*} \frac {2 i \, \sqrt {2} a e^{\left (-\frac {1}{2}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, e^{\left (i \, d x + i \, c\right )}\right )\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))/(e*sec(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

2*I*sqrt(2)*a*e^(-1/2)*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, e^(I*d*x + I*c)))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} i a \left (\int \left (- \frac {i}{\sqrt {e \sec {\left (c + d x \right )}}}\right )\, dx + \int \frac {\tan {\left (c + d x \right )}}{\sqrt {e \sec {\left (c + d x \right )}}}\, dx\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))/(e*sec(d*x+c))**(1/2),x)

[Out]

I*a*(Integral(-I/sqrt(e*sec(c + d*x)), x) + Integral(tan(c + d*x)/sqrt(e*sec(c + d*x)), x))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))/(e*sec(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate((I*a*tan(d*x + c) + a)*e^(-1/2)/sqrt(sec(d*x + c)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}{\sqrt {\frac {e}{\cos \left (c+d\,x\right )}}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(c + d*x)*1i)/(e/cos(c + d*x))^(1/2),x)

[Out]

int((a + a*tan(c + d*x)*1i)/(e/cos(c + d*x))^(1/2), x)

________________________________________________________________________________________